﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;

namespace YwhLib
{
    /// <summary>
    /// 期数
    /// </summary>
    [FreeSql.DataAnnotations.Index("phase_phaseno", "PhaseNo", true)]
    public class Phase
    {

        /// <summary>
        /// 期数
        /// </summary>
        [Required]
        [Range(1, 10000, ErrorMessage = "请输入大于1的期号")]
        public int PhaseNo { get; set; }

        /// <summary>
        /// 期数字符
        /// </summary>
        [FreeSql.DataAnnotations.Column(IsIgnore =true)]
        public string PhaseNoS { get { return PhaseNo.ToString(); } }

        /// <summary>
        /// 楼栋数量
        /// </summary>
        [Required]
        [Range(1, 10000, ErrorMessage = "请输入大于1的楼栋数")]
        public int BuildingNum { get; set; }

        /// <summary>
        /// 名称，比如某某苑
        /// </summary>
        public string Name { get; set; }
    }
}
